<div id="setup_tasks">
  <% task_in_progress = nil %>
  <% current_store.setup_tasks_list.each_with_index do |task, index| %>
    <% done = current_store.setup_task_done?(task) %>
    <% unless done %>
      <% task_in_progress ||= task %>
    <% end %>

    <details class="collapsable-card mb-3" <% if task_in_progress == task %>open<% end %> id="setup_task_<%= task %>">
      <summary class="card-header border-0 h-auto text-decoration-none d-flex align-items-center p-3 text-dark font-weight-normal w-100 card-title bg-transparent list-style-none" role="button" tabindex="0">
        <%= onboarding_check_circle(done) %>
        <span class="ml-3"><%= Spree.t("admin.store_setup_tasks.#{task}") %></span>
        <%= icon('chevron-right', class: 'arrow ml-auto') %>
      </summary>
      <div class="animate__animated animate__fadeIn animate__faster">
        <div class="card-body">
          <%= render "spree/admin/dashboard/setup_tasks/#{task}", done: done %>
        </div>
      </div>
    </details>
  <% end %>
</div>
